﻿package com.zjhcsoft.util;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 动态多数据源切换工具类
 **/
public class DynamicDataSource extends AbstractRoutingDataSource{

	 /* (non-Javadoc)
	  * @see org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource#determineCurrentLookupKey()
	  */
	 protected Object determineCurrentLookupKey() {
	      return DbContextHolder.getDbType();
	 }

	}

